#ifndef TIMERLABLE_H
#define TIMERLABLE_H

#include <QLabel>
#include <QObject>
#include <QWidget>
#include <QPainter>
#include <QPixmap>
#include <QTimer>
#include <QTime>

namespace Hand
{
    const QPoint hourHand[4] = {
        QPoint(3, 15),
        QPoint(0, 15),
        QPoint(-3, -100),
        QPoint(0, -100)
    };

    const QPoint hourHandShadow[4] = {
        QPoint(5, 15),
        QPoint(2, 15),
        QPoint(-1, -100),
        QPoint(2, -100)
    };

    const QPoint minuteHand[4] = {
        QPoint(3, 15),
        QPoint(0, 15),
        QPoint(-3, -120),
        QPoint(0, -120)
    };

    const QPoint minuteHandShadow[4] = {
        QPoint(5, 15),
        QPoint(2, 15),
        QPoint(-1, -120),
        QPoint(2, -120)
    };

    const QPoint secondHand[4] = {
        QPoint(1, 0),
        QPoint(0, 0),
        QPoint(-1, -150),
        QPoint(0, -150)
    };

    const QPoint secondHandShadow[4] = {
        QPoint(2, 0),
        QPoint(1, 0),
        QPoint(0, -150),
        QPoint(1, -150)
    };
}

class timerLable : public QLabel
{
    Q_OBJECT
public:
    explicit timerLable(QWidget *parent = nullptr);
    ~timerLable();
    void paintEvent(QPaintEvent * pe);
    void hourPointerPaint(QPainter * painter);
    void minutePointerPaint(QPainter * painter);
    void secondPointerPaint(QPainter * painter);
    void secondPointerShadowPaint(QPainter *painter);
    void minutePointerShadowPaint(QPainter *painter);
    void hourPointerShadowPaint(QPainter *painter);
private:
    QTimer *timer;
};

#endif // TIMERLABLE_H
